home *** CD-ROM | disk | FTP | other *** search
- global gRemainingBalls, gBrickMax, gBrickNum, gBallSpeed, gPaused, gCurrentSection
-
- on startMovie
- gPaused = 1
- gRemainingBalls = 3
- gBrickMax = 16
- if the machineType = 256 then
- the soundDevice = "QT3MIX"
- end if
- put gRemainingBalls into member "RemainingBalls"
- set the timeoutLength to 60 * 60 * 1
- end
-
- on timeout
- global gCurrentSection
- if gPaused = 1 then
- go("Attract")
- end if
- end
-
- on checkkey
- quit()
- end
-
- on setCurrentSection sectionName
- gCurrentSection = sectionName
- end
-
- on initCurrentSection
- case gCurrentSection of
- "Level 1":
- if the frameLabel <> 0 then
- gRemainingBalls = 3
- put gRemainingBalls into member "RemainingBalls"
- gBrickNum = 0
- end if
- gBallSpeed = 2
- "Level 2":
- if the frameLabel <> 0 then
- gBrickNum = 0
- end if
- gBallSpeed = 3
- "Level 3":
- if the frameLabel <> 0 then
- gBrickNum = 0
- end if
- gBallSpeed = 4
- "Looser 1", "Looser 2", "Looser 3", "GameOver", "Winner", "Exit":
- gPaused = 1
- puppetSound(0)
- puppetSound(2, 0)
- puppetSound(3, 0)
- end case
- end
-
- on togglePausePlay
- global gPaused
- gPaused = not gPaused
- case gCurrentSection of
- "Looser 1", "Looser 2", "Looser 3", "GameOver", "Exit":
- go("Level 1")
- end case
- end
-
- on launchBall
- initCurrentSection()
- updateReaminingBallReadout()
- ballS = 100
- sprite(ballS).member = member("ball" && gCurrentSection)
- sprite(ballS).loc = point(320, 240)
- sendSprite(100, #beginSprite)
- end
-
- on updateReaminingBallReadout
- global gRemainingBalls, gCurrentSection
- gRemainingBalls = gRemainingBalls - 1
- put gRemainingBalls into member "RemainingBalls"
- if gRemainingBalls = 0 then
- case gCurrentSection of
- "Level 1":
- go("Looser 1")
- "Level 2":
- go("Looser 2")
- "Level 3":
- go("Looser 3")
- end case
- end if
- end
-
- on goURL url
- gotoNetPage(url)
- end
-
- on HyperlinkClicked me, url
- gotoNetPage(url)
- end
-
- on wait ticks
- startDelay = the timer
- repeat while the timer < (startDelay + ticks)
- updateStage()
- end repeat
- end
-